package com.intellagric.controller.portal.page;

import com.intellagric.common.pojo.LayuiDataGridResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: zhy
 * @email: 1269679946@qq.com
 * @Date: 2019/1/7
 * @DESC： 页面访问路径控制
 */
@Controller
public class PageController {

    /**
     * 主页
     */
    @RequestMapping("/portal/{module}")
    public String toPortalModel(@PathVariable String module) {
        return "portal/" + module;
    }

    /**
     * 物联网首页
     */
    @RequestMapping("/ift")
    public String toIndex() {
        return "iftmonitor/index";
    }


    /**
     * 物联网监控模块
     */
    @RequestMapping("/ift/{module}")
    public String toIftModel(@PathVariable String module) {
        return "iftmonitor/" + module;
    }

    /**
     * 溯源首页
     */
    @RequestMapping("/traceability")
    public String toTraceabilityIndex() {
        return "traceability/index";
    }

    /**
     * 溯源模块
     */
    @RequestMapping("/traceability/{module}")
    public String toTraceabilityModel(@PathVariable String module) {
        return "traceability/" + module;
    }


}
